﻿@model IEnumerable<MVCSample.Controllers.Book>

@{
    ViewData["Title"] = "Books";
}

<h1>Books</h1>

<p>
    <a asp-action="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Id)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Publisher)
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model!) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Id)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Publisher)
            </td>
        </tr>
}
    </tbody>
</table>

<partial name="MyPartial" />